#靠右三角形
# line =1
# while line <=5:
#     n = 1
#     str1 = ''
#     while n<= line:
#         str1 += '*'
#         n+=1
#     print(str1.rjust(20,' '))
#     line +=1

#居中三角形
#定义初始值（暂时还没通）
# line = 1
# #循环体
# while line <= 5:
#     n = 1
#     str1 = ''
#     while n <= line:
#         str1 += '*'
#         n+=1
#         print(" " * (line - n) + (n * 2 - 1) * "*")
#         line+=1



 # 定义初始值1
# i = 1
#  2、循环体
# row = int(input("输入几行居中三角形："))
# while i <= row:
     # 3、每行输出的为：空格*（总行数-第几行）+（第几行*2-1)*星号
#     print(" " * (row - i) + (i * 2 - 1) * "*")
#     # 4、循环加
#     i += 1

#列表[1,2,3,4,3,4,2,5,5,8,9,7],将此列表去重，得到一个唯一元素的列表  #不允许用强制类型转化
# list2 = [1, 2, 3, 4, 3, 4, 2, 5, 5, 8, 9, 7]
# list3 = []
# for i in list2:
#     if i not in list3:
#         list3.append(i)
# print(list3)


